<!doctype html>
<html>
<head>
<include file="public:head" />
<css file="__STATIC__/css/default/user.css" />
</head>
<body>
<include file="public:header" />
<div class="main_wrap">
    <div class="personal clearfix">
        <include file="user:left" />
        <div class="setting_box fl">
            <present name="msg"><div class="<if condition="$msg.status eq 1">green_alert<else/>pink_alert</if>">{$msg.info}</div></present>
            <div id="setting_list">
                <div class="settings_title"><span>{:L('address_title')}</span></div>
                <table class="table_list" width="100%">
                    <tr>
                        <th>{:L('consignee')}</th>
                        <th>{:L('mobile')}</th>
                        <th>{:L('address')}</th>
                        <th>{:L('zip')}</th>
                        <th>{:L('operations_manage')}</th>
                    </tr>
                    <volist name="address_list" id="val">
                    <tr>
                        <td align="center">{$val.consignee}</td>
                        <td align="center">{$val.mobile}</td>
                        <td>{$val.address}</td>
                        <td align="center">{$val.zip}</td>
                        <td align="center">
                            <a href="{:U('user/address', array('id'=>$val['id']))}" class="green">{:L('edit')}</a> 
                            <span class="green">|</span> 
                            <a href="{:U('user/address', array('id'=>$val['id'], 'type'=>'del'))}" class="green">{:L('delete')}</a>
                        </td>
                    </tr>
                    </volist>
                </table>
                <div class="settings_title mt25"><span>{:L('add_address')}</span></div>
                <form id="J_address_form" action="{:U('user/address')}" method="post">
                <table class="table_form" width="100%">
                    <tr>
                        <th width="70">{:L('consignee')}：</th>
                        <td><input type="text" id="J_consignee" class="gray_text" name="consignee" value="{$info.consignee}"></td>
                    </tr>
                    <tr>
                        <th>{:L('address')}：</th>
                        <td><input type="text" id="J_address" class="gray_text" name="address" size="50" value="{$info.address}"></td>
                    </tr>
                    <tr>
                        <th>{:L('zip')}：</th>
                        <td><input type="text" class="gray_text" name="zip" size="8" value="{$info.zip}"></td>
                    </tr>
                    <tr>
                        <th>{:L('mobile')}：</th>
                        <td><input type="text" id="J_mobile" class="gray_text" name="mobile" value="{$info.mobile}"></td>
                    </tr>
                    <tr>
                        <th></th>
                        <td><input type="submit" class="btn" value="{:L('ok')}"></td>
                    </tr>
                </table>
                <input type="hidden" name="id" value="{$info.id}">
                </form>
            </div>
        </div>
    </div>
</div>

<include file="public:footer" />
<script src="__STATIC__/js/setting.js"></script>
</body>
</html>
